<!DOCTYPE html><html><head><title>请求数据</title><meta charset='utf-8'><link href='https://dn-maxiang.qbox.me/res-min/themes/marxico.css' rel='stylesheet'><style></style></head><body><div id='preview-contents' class='note-content'>
                        
                    



<h2 id="请求数据">请求数据</h2>

<blockquote>
  <p>共 <code>get</code> 一个接口</p>
</blockquote>

<hr>

<h3 id="get"><code>get</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">前端请求数据的唯一接口。后端接到请求后，判断权限，查询并返回数据<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs awk">http:<span class="hljs-regexp">//</span><span class="hljs-number">10.236</span>.<span class="hljs-number">44.188</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/data/g</span>et.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs livecodeserver"><span class="hljs-number">1.</span> p : <span class="hljs-string">"1"</span>                                       <span class="hljs-comment"># 工程ID。即请求哪个工程的数据</span><br><span class="hljs-number">2.</span> f : <span class="hljs-string">"2"</span>                                       <span class="hljs-comment"># 功能ID。即请求哪个功能的数据</span><br><span class="hljs-number">3.</span> <span class="hljs-keyword">a</span> : <span class="hljs-string">"search"</span>                                  <span class="hljs-comment"># action名。即请求功能的哪个方法</span><br><span class="hljs-number">4.</span> ps : <span class="hljs-string">"dstart=2017-06-01&amp;userid=6"</span>             <span class="hljs-comment"># 参数列表</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs dts">{<br><span class="hljs-symbol">    res:</span> <span class="hljs-string">"0"</span>,                <span class="hljs-meta"># 0 = 请求正常；1 = 请求异常；2 = 没权限 </span><br><span class="hljs-symbol">    data:</span> <span class="hljs-string">"{datas}"</span>，        <span class="hljs-meta"># 请求正常时返回的数据</span><br><span class="hljs-symbol">    msg:</span> <span class="hljs-string">"error"</span>             <span class="hljs-meta"># 请求异常时返回的错误信息</span><br>}<br></code></pre></div></body></html>